import common from "../common";
import constants from "../constants";

const sysGroupApi = {
    findSysGroupDept: (data, success, error) => {
        return common.requestData(constants.API_FindSysGroupDept, data, success, error);
    },
    //查询SysGroup以及管理类型manageType、单位类型orgType
    findSysGroupsParams: (data, success, error) => {
        return common.requestData(constants.API_FindSysGroupsParams, data, success, error);
    },
    findSysUserOnUnit: (data, success, error) => {
        return common.requestData(constants.API_FindSysUserOnUnit, data, success, error);
    },
    findSysGroupTree: (data, success, error) => {
        return common.requestData(constants.API_FindSysGroupTree, data, success, error);
    },
    saveSysGroup: (data, success, error) => {
        return common.requestData(constants.API_SaveSysGroup, data, success, error);
    },
    batchDeleteDept: (data, success, error) => {
        return common.requestData(constants.API_BatchDeleteDept, data, success, error);
    },
    findSysGroupBySid: (data, success, error) => {
        return common.requestData(constants.API_GetSysGroupBySid, data, success, error);
    },
    deleteSysGroup: (data, success, error) => {
        return common.requestData(constants.API_DeleteSysGroup, data, success, error);
    },
    // 查询单位下的单位（包含本单位）
    findOrgDownByParams: (data, success, error) => {
        return common.requestData(constants.API_FindOrgDownByParams, data, success, error);
    },
    // 查询单位下的单位树（包含本单位）
    findSysGroupTree4Part: (data, success, error) => {
        return common.requestData(constants.API_FindSysGroupTree4Part, data, success, error);
    },
};

export default sysGroupApi;
